Skip to content

Use strings instead of chars in NumeralSystem#171

Merged
MDLC01 merged 5 commits into
typst:mainfrom
MDLC01:bijective-strings
Jun 1, 2026
Merged

Use strings instead of chars in NumeralSystem#171
MDLC01 merged 5 commits into
typst:mainfrom
MDLC01:bijective-strings

Conversation

@MDLC01
Copy link
Copy Markdown
Collaborator

@MDLC01 MDLC01 commented May 29, 2026

This is required for #170 because the number five is represented by the string "ه‍", which consists of two codepoints: <U+0647, U+200D>.

I changed every numeral system that previously used char to use &str instead.

@MDLC01 MDLC01 added the meta Discussion about the structure of this repo label May 29, 2026
@MDLC01 MDLC01 changed the title Use strings instead of chars for NumeralSystem::Bijective Use strings instead of chars in NumeralSystem May 29, 2026
Comment thread src/numeral_systems.rs Outdated
Co-authored-by: isuffix <ian@isuffix.com>
@MDLC01
Copy link
Copy Markdown
Collaborator Author

MDLC01 commented Jun 1, 2026

Thank you both. I'll merge this this PR without waiting so that we can hopefully merge #170 before the next release.

For the record, this is not a breaking change for Typst at all.

@MDLC01 MDLC01 merged commit e9e87c3 into typst:main Jun 1, 2026
2 checks passed
@MDLC01 MDLC01 deleted the bijective-strings branch June 1, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

meta Discussion about the structure of this repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants